package cn.xuanwu.map;

import cn.xuanwu.dto.Student;

import java.util.HashMap;

public class Demo5 {

    /*
     * * A:案例演示
     * HashMap集合键是Student,值是String的案例
     * 键是学生对象,代表每一个学生
     * 值是字符串对象,代表学生归属地
     */
    public static void main(String[] args) {
        HashMap<Student, String> map = new HashMap<>();
        map.put(new Student("张三",23),"北极");
        map.put(new Student("李四",24),"南极");
        map.put(new Student("王五",25),"俄罗斯");
        map.put(new Student("赵六",26),"韩国");
        System.out.println("map = " + map);
    }



}
